import java.io.*;

/**
 * 吧当前的目录的a.txt拷贝到c盘和目录
 */

public class CopyFile {
    public static void main(String[] args) throws Exception {

        BufferedInputStream bos=new BufferedInputStream(new FileInputStream("a.txt"));
        BufferedOutputStream bis=new BufferedOutputStream(new FileOutputStream("C:\\a.txt"));
        byte[]bys=new byte[1024];
        int len=0;
        while ((len=bos.read(bys))!=-1){
            System.out.println(new String(bys,0,len));
        }
        bos.close();
        bis.close();

    }
}
